package com.higgins.eventtracking.client.health.fundamentals;

import com.google.gwt.event.dom.client.ChangeEvent;
import com.google.gwt.event.dom.client.ChangeHandler;
import com.higgins.eventtracking.client.health.components.GenericChartPanel;
import com.higgins.eventtracking.client.health.components.HealthOverviewChartListBox;

public class FundamentalsChartPanel extends GenericChartPanel	{
	private HealthOverviewChartListBox chartListBox = new HealthOverviewChartListBox();
	private FundamentalsChart annotationChart = new FundamentalsChart();

	public FundamentalsChartPanel()	{
		add(chartListBox);
		chartListBox.addChangeHandler(new ChangeHandler()  {
			@Override
			public void onChange(ChangeEvent event) {
				int selectedIndex = chartListBox.getSelectedIndex();
				String chartName = chartListBox.getItemText(selectedIndex);
				annotationChart.execute(chartName);
			}  });
		add(annotationChart);
		annotationChart.execute("Well Being");
	}
}
